package com.hunt.dao;

import com.hunt.model.entity.SysUserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserRoleMapper {
    //新增
    public Long insert(SysUserRole sysUserRole);

    //更新
    public void update(SysUserRole sysUserRole);

    //通过对象进行查询
    public SysUserRole select(SysUserRole sysUserRole);

    //通过id进行查询
    public SysUserRole selectById(@Param("id") Long id);

    //查询全部
    public List<SysUserRole> selectAll();

    //查询数量
    public int selectCounts();

    void deleteUserRoleByUserId(@Param("userId") long userId);

    List<SysUserRole> selectByUserId(@Param("userId") Long userId);

    void deleteUserRoleByRoleId(@Param("id") long id);
}